export default {
    addDepartment(department){
        this.auth.department.push({
            id:department.id,
            name:department.name
        })
    },
    delDepartment(department){
        let index = this.auth.department.findIndex((item)=>{
            return item.id == department.id
        })
        this.auth.department.splice(index,1)
    },
    addUser(user){
        this.auth.user.push({
            id:user.id,
            name:user.name
        })
    },
    delUser(user){
        let index = this.auth.user.findIndex((item)=>{
            return item.id == user.id
        })
        this.auth.user.splice(index,1)
    },
    deleteNext(next){
        let index = this.next.findIndex((item)=>{
            return item.key == next.key
        })
        this.next.splice(index,1)
    }
}